package com.fjh.feign.hystrix;

import com.alibaba.fastjson.JSON;
import com.fjh.domain.Basket;
import com.fjh.feign.OrderCartFeign;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

import java.util.List;

@Component
@Slf4j
public class OrderCartFeignHystrix implements OrderCartFeign {
    /**
     * 远程调用购物车模块 根据ids拿到购物车集合
     * @param basketIds
     * @return
     */
    @Override
    public List<Basket> getBasketListByIds(List<Long> basketIds) {
        log.error("远程调用购物车模块 根据ids拿到购物车集合失败，购物车ids为{}", JSON.toJSONString(basketIds));
        return null;
    }

    /**
     *远程调用清空购物车
     * @param allSkuIds
     * @param userId
     */
    @Override
    public void clearCart(List<Long> allSkuIds, String userId) {
        log.error("远程调用清空购物车失败，allSkuIds为{},用户id为{}", JSON.toJSONString(allSkuIds), userId);
    }
}
